package com.ruoyi.question.service.impl;

import com.ruoyi.question.domain.DtQuestionAnalysis;
import com.ruoyi.question.mapper.DtQuestionAnalysisMapper;
import com.ruoyi.question.service.IDtQuestionAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 答案解析Service业务层处理
 *
 * @author llc
 * @date 2025-01-06
 */
@Service
public class DtQuestionAnalysisServiceImpl implements IDtQuestionAnalysisService {
    @Autowired
    private DtQuestionAnalysisMapper dtQuestionAnalysisMapper;

    /**
     * 查询答案解析
     *
     * @param id 答案解析主键
     * @return 答案解析
     */
    @Override
    public DtQuestionAnalysis selectDtQuestionAnalysisById(Long id) {
        return dtQuestionAnalysisMapper.selectDtQuestionAnalysisById(id);
    }

    /**
     * 查询答案解析列表
     *
     * @param dtQuestionAnalysis 答案解析
     * @return 答案解析
     */
    @Override
    public List<DtQuestionAnalysis> selectDtQuestionAnalysisList(DtQuestionAnalysis dtQuestionAnalysis) {
        return dtQuestionAnalysisMapper.selectDtQuestionAnalysisList(dtQuestionAnalysis);
    }

    /**
     * 新增答案解析
     *
     * @param dtQuestionAnalysis 答案解析
     * @return 结果
     */
    @Override
    public int insertDtQuestionAnalysis(DtQuestionAnalysis dtQuestionAnalysis) {
        return dtQuestionAnalysisMapper.insertDtQuestionAnalysis(dtQuestionAnalysis);
    }

    /**
     * 修改答案解析
     *
     * @param dtQuestionAnalysis 答案解析
     * @return 结果
     */
    @Override
    public int updateDtQuestionAnalysis(DtQuestionAnalysis dtQuestionAnalysis) {
        return dtQuestionAnalysisMapper.updateDtQuestionAnalysis(dtQuestionAnalysis);
    }

    /**
     * 批量删除答案解析
     *
     * @param ids 需要删除的答案解析主键
     * @return 结果
     */
    @Override
    public int deleteDtQuestionAnalysisByIds(Long[] ids) {
        return dtQuestionAnalysisMapper.deleteDtQuestionAnalysisByIds(ids);
    }

    /**
     * 删除答案解析信息
     *
     * @param id 答案解析主键
     * @return 结果
     */
    @Override
    public int deleteDtQuestionAnalysisById(Long id) {
        return dtQuestionAnalysisMapper.deleteDtQuestionAnalysisById(id);
    }
}
